if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
    set(CMAKE_INSTALL_PREFIX "${project_root}/install" CACHE PATH "install path" FORCE)
endif()

set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/lib")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin")
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER "CMakeTargets")
option(BUILD_SHARED_LIBS "Build using shared libraries" OFF)

if (APPLE)
    set(CMAKE_BUILD_WITH_INSTALL_RPATH ON)
    if (VULKAN_SUPPORT)
        set(CMAKE_INSTALL_RPATH "@executable_path;/usr/local/lib")
    else()
        set(CMAKE_INSTALL_RPATH "@executable_path")
    endif()
endif()
